<?php

/**
 * RSS generating file
 *
 * @version $Id$
 * @copyright 2010
 */
session_start();

include 'config.php';
include 'loader.php';

$db = new DB($dbserver,$dbuser,$dbpassword,$dbname); //values from config
$core = new Core();
$theme = new Theme();

$plugin_name = $_SESSION['plugin'];
if($core->is_plugin($plugin_name))
{
	$plugin = $core->load_plugin($plugin_name);
}
else
{
	$plugin = $core->load_plugin(DEFAULT_PLUGIN);
}

if(method_exists($plugin,'rss'))
{
	echo '<?xml version="1.0" encoding="utf-8"?>
	 <rss version="2.0">
	 <channel>
	 <title>'.PAGE_NAME.'</title>
	 <description>'.PAGE_DESC.'</description>
	 <link>'.WEB_URL.'</link>';

	$plugin->rss();

	echo '</channel>
	</rss>';
}

?>